/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * @author Javier Aparicio García
 */
package formula.one.urjc.admin.view;

import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JList;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 *
 * @author Javier Aparicio García
 */
public class VentanaAminEscuderia extends javax.swing.JInternalFrame {


    /** Creates new form VentanaAminEcudAlta */
    public VentanaAminEscuderia() {
        initComponents();
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabelPropietario = new javax.swing.JLabel();
        jTextPropietario = new javax.swing.JTextField();
        jLabelNombre = new javax.swing.JLabel();
        jTextNombre = new javax.swing.JTextField();
        jLabelPais = new javax.swing.JLabel();
        jTextPais = new javax.swing.JTextField();
        jLabelAnyo = new javax.swing.JLabel();
        jTextAnyo = new javax.swing.JTextField();
        jLabelPresupuesto = new javax.swing.JLabel();
        jTextPresupuesto = new javax.swing.JTextField();
        jLabelDirectivos = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextDirectivos = new javax.swing.JTextArea();
        jBtAlta = new javax.swing.JButton();
        jCBModificar = new javax.swing.JComboBox();
        jBtCargarEsc = new javax.swing.JButton();
        jBtEliminar = new javax.swing.JButton();
        jBtModificar = new javax.swing.JButton();
        jBtLimpiar = new javax.swing.JButton();
        jBtSalir = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        jLabel1.setText("jLabel1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Administración de Escudería");

        jLabelPropietario.setText("Dueño:");

        jLabelNombre.setText("Escudería: ");

        jLabelPais.setText("País:");

        jLabelAnyo.setText("Año creación:");

        jLabelPresupuesto.setText("Presupuesto:");

        jLabelDirectivos.setText("Directivos:");

        jTextDirectivos.setColumns(20);
        jTextDirectivos.setRows(5);
        jTextDirectivos.setToolTipText("Separar por ; los nombres de directivos");
        jScrollPane1.setViewportView(jTextDirectivos);

        jBtAlta.setText("Alta Escudería");

        jBtCargarEsc.setText("Cargar Escudería");

        jBtEliminar.setText("Eliminar");

        jBtModificar.setText("Modificar");

        jBtLimpiar.setText("Limpiar Form");

        jBtSalir.setText("Salir");

        jLabel2.setText("Listado de escuderías dadas de alta:");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 568, Short.MAX_VALUE)
                    .add(jLabelPais)
                    .add(jLabelDirectivos)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabelAnyo)
                            .add(jLabelNombre)
                            .add(jLabelPropietario))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jTextPropietario, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jTextNombre, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
                            .add(layout.createSequentialGroup()
                                .add(jTextAnyo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 184, Short.MAX_VALUE)
                                .add(jLabelPresupuesto)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTextPresupuesto, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(jTextPais, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)))
                    .add(layout.createSequentialGroup()
                        .add(18, 18, 18)
                        .add(jBtAlta, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 117, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jBtModificar)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jBtEliminar)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jBtLimpiar)
                        .add(18, 18, 18)
                        .add(jBtSalir)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(layout.createSequentialGroup()
                        .add(jCBModificar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 346, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jBtCargarEsc, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jLabel2)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 338, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(23, 23, 23))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelPropietario)
                    .add(jTextPropietario, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelNombre)
                    .add(jTextNombre, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelPais)
                    .add(jTextPais, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelAnyo)
                    .add(jTextAnyo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jTextPresupuesto, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabelPresupuesto))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jLabelDirectivos)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 59, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jCBModificar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jBtCargarEsc))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jBtModificar)
                    .add(jBtAlta)
                    .add(jBtEliminar)
                    .add(jBtLimpiar)
                    .add(jBtSalir))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VentanaAminEscuderia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VentanaAminEscuderia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VentanaAminEscuderia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaAminEscuderia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VentanaAminEscuderia().setVisible(true);
            }
        });
    }

    public JButton getjBtLimpiar() {
        return jBtLimpiar;
    }

    

    public JButton getjBtAlta() {
        return jBtAlta;
    }

    public JButton getjBtCargarEsc() {
        return jBtCargarEsc;
    }

    public JButton getjBtEliminar() {
        return jBtEliminar;
    }

    public JButton getjBtModificar() {
        return jBtModificar;
    }


    public JTextField getjTextAnyo() {
        return jTextAnyo;
    }

    public JTextArea getjTextDirectivos() {
        return jTextDirectivos;
    }

    public JTextField getjTextNombre() {
        return jTextNombre;
    }

    public JTextField getjTextPais() {
        return jTextPais;
    }

    public JTextField getjTextPresupuesto() {
        return jTextPresupuesto;
    }

    public JTextField getjTextPropietario() {
        return jTextPropietario;
    }

    public JButton getjBtSalir() {
        return jBtSalir;
    }

    
    //get del combo que almacena las escuderias ya creadas
    public JComboBox getjCBModificar() {
        return jCBModificar;
    }
    //creo un modelo para cargar el combobox con las escuderias de los archivos
    public DefaultComboBoxModel getModelCBModificar() {
        if (modelCBModificar==null){
            modelCBModificar=new DefaultComboBoxModel();
        }
        return modelCBModificar;
    }

    public DefaultListModel getModelListPilotOfic() {
        if(modelListPilotOfic==null){
           modelListPilotOfic=new DefaultListModel();
        }
           
        return modelListPilotOfic;
    }
    public DefaultListModel getModelListPilotProb() {
        if(modelListPilotProb==null){
           modelListPilotProb=new DefaultListModel();
        }
           
        return modelListPilotProb;
    }

    public DefaultComboBoxModel getModelCBPilotosLibres() {
        if(modelCBPilotosLibres==null){
            modelCBPilotosLibres=new DefaultComboBoxModel();
        }
        return modelCBPilotosLibres;
    }
    
    
    private DefaultListModel modelListPilotOfic;
    private DefaultListModel modelListPilotProb;
    private DefaultComboBoxModel modelCBModificar;
    private DefaultComboBoxModel modelCBPilotosLibres;
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBtAlta;
    private javax.swing.JButton jBtCargarEsc;
    private javax.swing.JButton jBtEliminar;
    private javax.swing.JButton jBtLimpiar;
    private javax.swing.JButton jBtModificar;
    private javax.swing.JButton jBtSalir;
    private javax.swing.JComboBox jCBModificar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabelAnyo;
    private javax.swing.JLabel jLabelDirectivos;
    private javax.swing.JLabel jLabelNombre;
    private javax.swing.JLabel jLabelPais;
    private javax.swing.JLabel jLabelPresupuesto;
    private javax.swing.JLabel jLabelPropietario;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTextAnyo;
    private javax.swing.JTextArea jTextDirectivos;
    private javax.swing.JTextField jTextNombre;
    private javax.swing.JTextField jTextPais;
    private javax.swing.JTextField jTextPresupuesto;
    private javax.swing.JTextField jTextPropietario;
    // End of variables declaration//GEN-END:variables
}
